package cn.tedu.micro.demo.all.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    //利用属性注入的方式,获取当前web应用 占用的端口号
    @Value("${server.port}")
    private String port;
    @GetMapping("/cart/hello")
    public String sayHello(){
        String message="hello gateway i am from "+port;
        return message;
    }
}

